from sqlalchemy import JSON
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import Mapped, mapped_column

from owl_admin.ext import db


class AgentConfigPO(db.Model):
    __tablename__ = 'graph_config'
    __table_args__ = {'comment': 'AI智能体配置'}

    id: Mapped[int] = mapped_column(BIGINT(20), primary_key=True, comment='主键')
    name: Mapped[str] = mapped_column(db.String(100), nullable=False, comment='配置名称')
    type: Mapped[str] = mapped_column(db.String(100), nullable=False, comment='配置类型')
    graph: Mapped[JSON] = mapped_column(JSON, nullable=False, comment='配置内容')

